<!DOCTYPE html>
<html lang="en">
    <head>
		<meta charset="GB2312" />
        <meta http-equiv="X-UA-Compatible" content1="IE=edge,chrome=1"> 
        <title>昌吉调查1-5</title>
        <meta name="viewport" content1="width=device-width, initial-scale=1.0"> 
        <meta name="description" content1="Animated content1 tab1s with CSS3" />
        <meta name="keywords" content1="tab1s, css3, transition, checked, pseudo-class, label, css-only, sibling combinator" />
        <link rel="stylesheet" type="text/css" href="css/demo.css" />
        <link rel="stylesheet" type="text/css" href="css/style2.css" />
        <link rel="stylesheet" type="text/css" href="css/common.css" />
		<script type="text/javascript" src="js/modernizr.custom.04022.js"></script>
		<script type="text/javascript" src="js/jquery-1.6.min.js"></script>
		<!--[if lt IE 9]>
			<style>
				.content1{
					height: auto;
					margin: 0;
				}
				.content1 div {
					position: relative;
				}
			</style>
		<![endif]-->
    </head>
    <body onload="updateTable()">
        <div class="container">
			<section class="tab1s1">
	            <input id="tab1-1" type="radio" onchange="showContentPage(this)" hidden name="radio-set1" value="content1-1" class="tab1-selector-1" />
		        <label for="tab1-1" class="tab1-label-1">0-100</label>
		
	            <input id="tab1-2" type="radio" onchange="showContentPage(this)" hidden name="radio-set1" value="content1-2" class="tab1-selector-2" />
		        <label for="tab1-2" class="tab1-label-2">100-200</label>
		
	            <input id="tab1-3" type="radio" onchange="showContentPage(this)" hidden name="radio-set1" value="content1-3" class="tab1-selector-3" />
		        <label for="tab1-3" class="tab1-label-3">200-300</label>
			
	            <input id="tab1-4" type="radio" onchange="showContentPage(this)" hidden name="radio-set1" value="content1-4" class="tab1-selector-4" />
		        <label for="tab1-4" class="tab1-label-4">300-400</label>
		        
		        <input id="tab1-5" type="radio" onchange="showContentPage(this)" hidden name="radio-set1" value="content1-5" class="tab1-selector-5" />
		        <label for="tab1-5" class="tab1-label-5">400-500</label>
            
			    <div class="clear-shadow"></div>
			
		        <div class="content1">
			        <div class="content1-1" style="display: none">
						    <table 
								bordercolor="#339999" bgcolor="#DBDBDB"  id="gridtable_1" class="gridtable">
							</table>
				    </div>
			        <div class="content1-2" style="display: none">
	                        <table 
								bordercolor="#339999" bgcolor="#DBDBDB"  id="gridtable_2" class="gridtable">
							</table>					      	
				    </div>
			        <div class="content1-3" style="display: none">
						 <table 
								bordercolor="#339999" bgcolor="#DBDBDB"  id="gridtable_3" class="gridtable">
							</table>
				    </div>
				    <div class="content1-4" style="display: none">
						 <table 
								bordercolor="#339999" bgcolor="#DBDBDB"  id="gridtable_4" class="gridtable">
							</table>
				    </div>
				    <div class="content1-5" style="display: none">
                       <table 
								bordercolor="#339999" bgcolor="#DBDBDB"  id="gridtable_5" class="gridtable">
							</table>
				    </div>
		        </div>
			</section>
        </div>
       
    </body>
</html>
<script type="text/javascript">
function showContentPage(ele) {
    showContentIndex($(ele).index()/2);
}
function showContentIndex(index){
    var content=$('.content1').children();
    for(var i= 0;i< content.length;i++){
        var item= content.eq(i);
        if(i==index){
            item.css("display","block");
        }else{
            item.css("display","none");
        }
    }
}
function showFirstPage(){
    var lab=$(".tab1s1 label");
    for(var i= 0;i< lab.length;i++){
        var dis=lab.eq(i).css("display");
        if(dis!="none"){
            showContentIndex(i);
            break;
        }
    }
    var check=$(".tab1s1 input[type='radio']");
    for(var j=0;j<check.length;j++){
        if(j==i){
            check.eq(j).attr("checked",'checked');
        }else{
            check.eq(j).removeAttr("checked");
        }
    }
}

function getData(){
    var radios=$("input[type=radio]");
    for(var i in radios){
        if(radios[i].checked)
            break;
    }

    var vals=[];
    $('.content1').children().eq(i).find("input").each(function(){
        if(this.getAttribute("type")=="hidden"){
            var obj={};
            obj[this.getAttribute("name")]=this.value;
            vals.push(obj);
        }else{
            var item=vals[vals.length-1];
            item[this.getAttribute("name")]=this.value;
        }
        return true;
    });

    window.android.onDataUpdate(JSON.stringify(vals),$('.tab1s1 label').eq(i).text());
}
function initStartTab(index){
    var lab=$(".tab1s1 label");
    for(var i= 0;i< index;i++){
        lab.eq(i).css("display","none");
    }
}
function initEndTab(index){
    var lab=$(".tab1s1 label");
    for(var i= lab.length;i> index;i--){
        lab.eq(i).css("display","none");
    }
}
function updateTable(data){
    var result=eval(data);
     //	var result=[{"checkEight":1,"checkFive":5,"checkFour":3,"checkNine":4,"checkOne":5,"checkSeven":7,"checkSix":6,"checkTen":10,"checkThree":11,"checkTwo":1,"columnID":"02b2913f-a023-40c9-a1f4-cef4fe58612a","columnName":"龟裂","iD":"eadad4b6-951b-4d9f-b77f-92a77f38d71d","nickName":"轻","sortID":1,"structID":"66501578-7697-4699-b666-3db07d211efc","surveyEight":1,"surveyFive":5,"surveyFour":4,"surveyNine":3,"surveyOne":1,"surveySeven":7,"surveySix":4,"surveyTen":3.8,"surveyThree":3,"surveyTwo":2,"type":"沥青路面","unit":"?"},{"checkEight":0,"checkFive":0,"checkFour":0,"checkNine":0,"checkOne":0,"checkSeven":0,"checkSix":0,"checkTen":0,"checkThree":0,"checkTwo":0,"columnID":"bae27c89-d022-4bec-ab1b-7eb71ac026ab","columnName":"龟裂 ","iD":"9dd5e2dd-0952-409a-b9bf-2ffb9d832a88","nickName":"中","sortID":2,"structID":"66501578-7697-4699-b666-3db07d211efc","surveyEight":0,"surveyFive":0,"surveyFour":2,"surveyNine":0,"surveyOne":0,"surveySeven":2,"surveySix":0,"surveyTen":0,"surveyThree":0,"surveyTwo":0,"type":"沥青路面","unit":"?"},{"checkEight":0,"checkFive":0,"checkFour":0,"checkNine":0,"checkOne":0,"checkSeven":0,"checkSix":0,"checkTen":0,"checkThree":0,"checkTwo":0,"columnID":"7d5c00cc-872f-48c7-9748-fcffd401377d","columnName":"龟裂 ","iD":"a26936ae-c270-4798-9270-1a856d1beac6","nickName":"重","sortID":3,"structID":"66501578-7697-4699-b666-3db07d211efc","surveyEight":3,"surveyFive":0,"surveyFour":2,"surveyNine":0,"surveyOne":0,"surveySeven":0,"surveySix":2,"surveyTen":0,"surveyThree":0,"surveyTwo":0,"type":"沥青路面","unit":"?"},{"checkEight":0,"checkFive":0,"checkFour":0,"checkNine":0,"checkOne":0,"checkSeven":0,"checkSix":0,"checkTen":0,"checkThree":0,"checkTwo":0,"columnID":"7f6c6d96-4d1c-4eb0-b350-81cd6c73e66e","columnName":"块状裂缝","iD":"a3f57442-f28e-467a-9819-75f7dbdb4c20","nickName":"轻 ","sortID":4,"structID":"66501578-7697-4699-b666-3db07d211efc","surveyEight":0,"surveyFive":0,"surveyFour":0,"surveyNine":0,"surveyOne":0,"surveySeven":0,"surveySix":0,"surveyTen":0,"surveyThree":0,"surveyTwo":0,"type":"沥青路面","unit":"?"},{"checkEight":0,"checkFive":0,"checkFour":0,"checkNine":0,"checkOne":0,"checkSeven":0,"checkSix":0,"checkTen":0,"checkThree":0,"checkTwo":0,"columnID":"814093be-ae53-494c-b2b3-c5027e13a185","columnName":"块状裂缝 ","iD":"6b47c65b-0e99-4eba-988c-13a46e40d4de","nickName":"重","sortID":5,"structID":"66501578-7697-4699-b666-3db07d211efc","surveyEight":0,"surveyFive":0,"surveyFour":0,"surveyNine":2,"surveyOne":0,"surveySeven":4,"surveySix":0,"surveyTen":0,"surveyThree":0,"surveyTwo":0,"type":"沥青路面","unit":"?"},{"checkEight":0,"checkFive":0,"checkFour":0,"checkNine":0,"checkOne":0,"checkSeven":0,"checkSix":0,"checkTen":0,"checkThree":0,"checkTwo":0,"columnID":"b5cf82e7-76db-42c3-b26f-ea7f530c2af4","columnName":"纵向裂缝","iD":"09918855-5b21-4a48-afc2-f0a3c14719f0","nickName":"轻","sortID":6,"structID":"66501578-7697-4699-b666-3db07d211efc","surveyEight":0,"surveyFive":0,"surveyFour":0,"surveyNine":0,"surveyOne":1.3,"surveySeven":0,"surveySix":0,"surveyTen":0,"surveyThree":0,"surveyTwo":0,"type":"沥青路面","unit":"m"},{"checkEight":0,"checkFive":0,"checkFour":0,"checkNine":0,"checkOne":0,"checkSeven":0,"checkSix":0,"checkTen":0,"checkThree":0,"checkTwo":0,"columnID":"926e8be7-15ff-4180-be5a-110945ffce6a","columnName":"纵向裂缝","iD":"bc784aad-b483-4c0b-a5fd-60f401b436ec","nickName":"重","sortID":7,"structID":"66501578-7697-4699-b666-3db07d211efc","surveyEight":0,"surveyFive":0,"surveyFour":0,"surveyNine":0,"surveyOne":0,"surveySeven":0,"surveySix":0,"surveyTen":0,"surveyThree":0,"surveyTwo":0,"type":"沥青路面","unit":"m"},{"checkEight":0,"checkFive":0,"checkFour":0,"checkNine":0,"checkOne":0,"checkSeven":0,"checkSix":0,"checkTen":0,"checkThree":0,"checkTwo":0,"columnID":"fd274489-0547-4ed6-a5a3-3de747d8cfe0","columnName":"横向裂缝","iD":"d3afed3f-06ba-49cd-9b68-14044749d067","nickName":"轻 ","sortID":8,"structID":"66501578-7697-4699-b666-3db07d211efc","surveyEight":0,"surveyFive":0,"surveyFour":0,"surveyNine":0,"surveyOne":0,"surveySeven":0,"surveySix":0,"surveyTen":0,"surveyThree":0,"surveyTwo":0,"type":"沥青路面","unit":"m"},{"checkEight":0,"checkFive":0,"checkFour":0,"checkNine":0,"checkOne":0,"checkSeven":0,"checkSix":0,"checkTen":0,"checkThree":0,"checkTwo":0,"columnID":"a9010564-9f8f-48bb-834f-1b6de7342dfd","columnName":"横向裂缝 ","iD":"fb257ec2-65ad-478a-ae98-b4746970490c","nickName":"重 ","sortID":9,"structID":"66501578-7697-4699-b666-3db07d211efc","surveyEight":0,"surveyFive":0,"surveyFour":0,"surveyNine":0,"surveyOne":0,"surveySeven":0,"surveySix":0,"surveyTen":0,"surveyThree":0,"surveyTwo":0,"type":"沥青路面","unit":"m"},{"checkEight":0,"checkFive":0,"checkFour":0,"checkNine":0,"checkOne":0,"checkSeven":0,"checkSix":0,"checkTen":0,"checkThree":0,"checkTwo":0,"columnID":"3351e98f-b9c3-4ea3-a69d-c00c3cf3ebf3","columnName":"坑槽","iD":"fbde092a-46ba-4f78-920f-4ac1b6115205","nickName":"轻","sortID":10,"structID":"66501578-7697-4699-b666-3db07d211efc","surveyEight":0,"surveyFive":0,"surveyFour":0,"surveyNine":0,"surveyOne":0,"surveySeven":0,"surveySix":0,"surveyTen":0,"surveyThree":0,"surveyTwo":0,"type":"沥青路面","unit":"m"},{"checkEight":0,"checkFive":0,"checkFour":0,"checkNine":0,"checkOne":0,"checkSeven":0,"checkSix":0,"checkTen":0,"checkThree":0,"checkTwo":0,"columnID":"e5263733-0244-40ee-831a-1590b80f6600","columnName":"坑槽 ","iD":"97d56f7e-e858-46da-8661-7c8bb735ccc4","nickName":"重 ","sortID":11,"structID":"66501578-7697-4699-b666-3db07d211efc","surveyEight":0,"surveyFive":0,"surveyFour":0,"surveyNine":0,"surveyOne":0,"surveySeven":0,"surveySix":0,"surveyTen":0,"surveyThree":0,"surveyTwo":0,"type":"沥青路面","unit":"?"},{"checkEight":0,"checkFive":0,"checkFour":0,"checkNine":0,"checkOne":0,"checkSeven":0,"checkSix":0,"checkTen":0,"checkThree":0,"checkTwo":0,"columnID":"11866720-7d94-4f1d-98fd-a5a8583589f1","columnName":"松散","iD":"1419da24-f227-4654-a9b9-6d675ea4e660","nickName":"轻","sortID":12,"structID":"66501578-7697-4699-b666-3db07d211efc","surveyEight":0,"surveyFive":0,"surveyFour":0,"surveyNine":0,"surveyOne":0,"surveySeven":0,"surveySix":0,"surveyTen":0,"surveyThree":0,"surveyTwo":0,"type":"沥青路面","unit":"?"},{"checkEight":0,"checkFive":0,"checkFour":0,"checkNine":0,"checkOne":0,"checkSeven":0,"checkSix":0,"checkTen":0,"checkThree":0,"checkTwo":0,"columnID":"2c1e0ee2-a0b2-415b-83b3-e55b60bd2369","columnName":"松散","iD":"0b7daa95-e70e-4b42-93ac-62f0d9aed8d3","nickName":"重","sortID":13,"structID":"66501578-7697-4699-b666-3db07d211efc","surveyEight":0,"surveyFive":0,"surveyFour":0,"surveyNine":0,"surveyOne":0,"surveySeven":0,"surveySix":0,"surveyTen":0,"surveyThree":0,"surveyTwo":0,"type":"沥青路面","unit":"?"},{"checkEight":0,"checkFive":0,"checkFour":0,"checkNine":0,"checkOne":0,"checkSeven":0,"checkSix":0,"checkTen":0,"checkThree":0,"checkTwo":0,"columnID":"8cd57573-e306-4eef-bad3-f3738aaadefa","columnName":"沉陷","iD":"e8039f45-9fd0-43a6-9732-a507e720fe85","nickName":"轻 ","sortID":14,"structID":"66501578-7697-4699-b666-3db07d211efc","surveyEight":0,"surveyFive":0,"surveyFour":0,"surveyNine":0,"surveyOne":0,"surveySeven":0,"surveySix":0,"surveyTen":0,"surveyThree":0,"surveyTwo":0,"type":"沥青路面","unit":"?"},{"checkEight":0,"checkFive":0,"checkFour":0,"checkNine":0,"checkOne":0,"checkSeven":0,"checkSix":0,"checkTen":0,"checkThree":0,"checkTwo":0,"columnID":"2c36fab7-23ae-4368-9acf-643954f98d86","columnName":"沉陷 ","iD":"e867145c-9ecf-4bdf-a3ba-1f6e68df45d6","nickName":"重","sortID":15,"structID":"66501578-7697-4699-b666-3db07d211efc","surveyEight":0,"surveyFive":0,"surveyFour":0,"surveyNine":0,"surveyOne":0,"surveySeven":0,"surveySix":0,"surveyTen":0,"surveyThree":0,"surveyTwo":0,"type":"沥青路面","unit":"?"},{"checkEight":0,"checkFive":0,"checkFour":0,"checkNine":0,"checkOne":0,"checkSeven":0,"checkSix":0,"checkTen":0,"checkThree":0,"checkTwo":0,"columnID":"62f2ca0f-2253-48f6-94f1-45e9d485cc76","columnName":"车辙","iD":"e3273e0b-e1bf-450f-9a82-d191236d2c29","nickName":"轻","sortID":16,"structID":"66501578-7697-4699-b666-3db07d211efc","surveyEight":0,"surveyFive":0,"surveyFour":0,"surveyNine":0,"surveyOne":0,"surveySeven":0,"surveySix":0,"surveyTen":0,"surveyThree":0,"surveyTwo":0,"type":"沥青路面","unit":"m"},{"checkEight":0,"checkFive":0,"checkFour":0,"checkNine":0,"checkOne":0,"checkSeven":0,"checkSix":0,"checkTen":0,"checkThree":0,"checkTwo":0,"columnID":"c26e25f8-f3e8-4326-a660-e7385e39448c","columnName":"车辙","iD":"464e264d-0428-4004-bcd5-ec8c347b698f","nickName":"重 ","sortID":17,"structID":"66501578-7697-4699-b666-3db07d211efc","surveyEight":0,"surveyFive":0,"surveyFour":0,"surveyNine":0,"surveyOne":0,"surveySeven":0,"surveySix":0,"surveyTen":0,"surveyThree":0,"surveyTwo":0,"type":"沥青路面","unit":"m"},{"checkEight":0,"checkFive":0,"checkFour":0,"checkNine":0,"checkOne":0,"checkSeven":0,"checkSix":0,"checkTen":0,"checkThree":0,"checkTwo":0,"columnID":"66bb65bb-01ed-4c44-a1f5-b1e9d3a865eb","columnName":"波浪拥抱","iD":"8d4bb460-00bc-474e-8dbb-e5669956ba82","nickName":"轻","sortID":18,"structID":"66501578-7697-4699-b666-3db07d211efc","surveyEight":0,"surveyFive":0,"surveyFour":0,"surveyNine":0,"surveyOne":0,"surveySeven":0,"surveySix":0,"surveyTen":0,"surveyThree":0,"surveyTwo":0,"type":"沥青路面","unit":"?"},{"checkEight":0,"checkFive":0,"checkFour":0,"checkNine":0,"checkOne":0,"checkSeven":0,"checkSix":0,"checkTen":0,"checkThree":0,"checkTwo":0,"columnID":"aa90b2fc-d87b-4948-be0e-8a81d11abed0","columnName":"波浪拥抱","iD":"76d3d2ba-1238-4d24-8603-6200fc88b998","nickName":"重","sortID":19,"structID":"66501578-7697-4699-b666-3db07d211efc","surveyEight":0,"surveyFive":0,"surveyFour":0,"surveyNine":0,"surveyOne":0,"surveySeven":0,"surveySix":0,"surveyTen":0,"surveyThree":0,"surveyTwo":0,"type":"沥青路面","unit":"?"},{"checkEight":0,"checkFive":0,"checkFour":0,"checkNine":0,"checkOne":0,"checkSeven":0,"checkSix":0,"checkTen":0,"checkThree":0,"checkTwo":0,"columnID":"4f4d4f7a-6b9c-459f-aeec-ea23147f3f3d","columnName":"泛油","iD":"fbb11c1c-8cd5-4152-b54f-2c50d97aeb28","nickName":"","sortID":20,"structID":"66501578-7697-4699-b666-3db07d211efc","surveyEight":0,"surveyFive":0,"surveyFour":0,"surveyNine":0,"surveyOne":0,"surveySeven":0,"surveySix":0,"surveyTen":0,"surveyThree":0,"surveyTwo":0,"type":"沥青路面","unit":"?"},{"checkEight":0,"checkFive":0,"checkFour":0,"checkNine":0,"checkOne":0,"checkSeven":0,"checkSix":0,"checkTen":0,"checkThree":0,"checkTwo":0,"columnID":"96e5ff95-54b7-4ce2-bfbc-cd4da8f2a79e","columnName":"修补","iD":"8dd9c418-fe8f-4b70-8125-0e3486b6cd11","nickName":"","sortID":21,"structID":"66501578-7697-4699-b666-3db07d211efc","surveyEight":0,"surveyFive":0,"surveyFour":0,"surveyNine":0,"surveyOne":0,"surveySeven":0,"surveySix":0,"surveyTen":0,"surveyThree":0,"surveyTwo":0,"type":"沥青路面","unit":"?"}];
     	var roadType ='沥青路面';//路基，沥青路面，砂石路面，水泥路面，沿线调查
     	var totalColumn=0;//生成表格的总的列数
     	if(roadType=='沥青路面'||roadType=='水泥路面'||roadType=='路基'){
     		totalColumn=7;
         }
        if(roadType=='砂石路面'){
        	totalColumn=3;
         }
        if(roadType=='沿线调查'){
        	totalColumn=5;
         }
     	var currName='';
     	var mapNum = {};//每个细目出现的次数 
     	var numFlag =0;//的次数
     	for(var i=0;i<result.length;i++){
         	if(currName==''){
         		currName=encodeURI((result[i].columnName+result[i].unit).trim());
         		numFlag=1;
         		continue;
             }
            if(currName==encodeURI((result[i].columnName+result[i].unit).trim())){
                numFlag++;
            }else{
                if(numFlag==3||numFlag==2)//出现了三次，没td 占一列
                {
                	mapNum[currName]=1;
                	currName=encodeURI((result[i].columnName+result[i].unit).trim());
                	numFlag=1;
                	continue;
                }
                if(numFlag==1)//出现了三次，没td 占一列
                {
                	mapNum[currName]=totalColumn-2;
                	currName=encodeURI((result[i].columnName+result[i].unit).trim());
                	numFlag=1;
                }
            }
        }
     	if(numFlag==3||numFlag==2)//出现了三次，没td 占一列
        {
        	mapNum[currName]=1;
        }
        if(numFlag==1)//出现了三次，没td 占一列
        {
        	mapNum[currName]=totalColumn-2;
        }
        //生成第一个tab
        function makeupTabOne(){
        	var html='';
            currName='';
        	var flag=0;//当前行的列
         	for(var i=0;i<result.length;i++){//通过判断明细项来确定是不是在同一行展示
             	if(currName==''){
             		currName=(result[i].columnName+result[i].unit).trim();
             		var column=mapNum[encodeURI((result[i].columnName+result[i].unit).trim())];
             		var  str='<tr>'
                 		+'<td width="16%" align="center" class="textItem">'+result[i].columnName+'</td>'
                 		+'<td width="12%" align="center" class="textItem">'+result[i].nickName+'('+result[i].unit+')</td>'
                 		+'<td width="12%" align="left" colspan='+column+'><input type="hidden" name="id" id="id_'+i+'" value="'+result[i].iD+'"/><input type="text" class="textInput" onfocus="inputfocus(this);" onblur="inputblur(this);"  id="surveyOne_"'+i+' name="surveyOne" value="'+result[i].surveyOne+'"></input></td>';
             		flag=3+column-1;
                }else{
                    if(currName==(result[i].columnName+result[i].unit).trim()){
                    	var column=mapNum[encodeURI((result[i].columnName+result[i].unit).trim())];
                    	var  str='<td width="12%" align="center" class="textItem">'+result[i].nickName+'('+result[i].unit+')</td>'
                     		+'<td width="12%" align="left" colspan='+column+'><input type="hidden" name="id" id="id_'+i+'" value="'+result[i].iD+'"/><input type="text" class="textInput" onfocus="inputfocus(this);" onblur="inputblur(this);"  id="surveyOne_"'+i+' name="surveyOne" value="'+result[i].surveyOne+'"></input></td>';
                 		flag=flag+2+column-1;
                    }else{
                        var perStr=''
                    	currName=(result[i].columnName+result[i].unit).trim();
                    	if(flag!=totalColumn){
                        	while(flag<totalColumn){
                            	flag++;
                            	perStr=perStr+'<td></td>'
                            }
                        }
                    	var column=mapNum[encodeURI((result[i].columnName+result[i].unit).trim())];
                    	var  str=perStr+'</tr><tr>'
                     		+'<td width="16%" align="center" class="textItem">'+result[i].columnName+'</td>'
                     		+'<td width="12%" align="center" class="textItem">'+result[i].nickName+'('+result[i].unit+')</td>'
                     		+'<td width="12%" align="left" colspan='+column+'><input type="hidden" name="id" id="id_'+i+'" value="'+result[i].iD+'"/><input type="text" class="textInput" onfocus="inputfocus(this);" onblur="inputblur(this);"  id="surveyOne_"'+i+' name="surveyOne" value="'+result[i].surveyOne+'"></input></td>';
                 		flag=3+column-1;
                    }
                }
         		html=html+str;
         	}
         	var perStr=''
         	if(flag!=totalColumn){
            	while(flag<totalColumn){
                	flag++;
                	perStr=perStr+'<td></td>'
                }
            }
           html=html+perStr;
         	var table = document.getElementById("gridtable_1");
         	table.innerHTML=html;
        }
        //生成第二个tab
        function makeupTabTwo(){
        	var html='';
            currName='';
        	var flag=0;//当前行的列
         	for(var i=0;i<result.length;i++){//通过判断明细项来确定是不是在同一行展示
             	if(currName==''){
             		currName=(result[i].columnName+result[i].unit).trim();
             		var column=mapNum[encodeURI((result[i].columnName+result[i].unit).trim())];
             		var  str='<tr>'
                 		+'<td width="16%" align="center" class="textItem">'+result[i].columnName+'</td>'
                 		+'<td width="12%" align="center" class="textItem">'+result[i].nickName+'('+result[i].unit+')</td>'
                 		+'<td width="12%" align="left" colspan='+column+'><input type="hidden" name="id" id="id_'+i+'" value="'+result[i].iD+'"/><input type="text" class="textInput" onfocus="inputfocus(this);" onblur="inputblur(this);"  id="surveyTwo_"'+i+' name="surveyTwo" value="'+result[i].surveyTwo+'"></input></td>';
             		flag=3+column-1;
                }else{
                    if(currName==(result[i].columnName+result[i].unit).trim()){
                    	var column=mapNum[encodeURI((result[i].columnName+result[i].unit).trim())];
                    	var  str='<td width="12%" align="center" class="textItem">'+result[i].nickName+'('+result[i].unit+')</td>'
                     		+'<td width="12%" align="left" colspan='+column+'><input type="hidden" name="id" id="id_'+i+'" value="'+result[i].iD+'"/><input type="text" class="textInput" onfocus="inputfocus(this);" onblur="inputblur(this);"  id="surveyTwo_"'+i+' name="surveyTwo" value="'+result[i].surveyTwo+'"></input></td>';
                 		flag=flag+2+column-1;
                    }else{
                        var perStr=''
                    	currName=(result[i].columnName+result[i].unit).trim();
                    	if(flag!=totalColumn){
                        	while(flag<totalColumn){
                            	flag++;
                            	perStr=perStr+'<td></td>'
                            }
                        }
                    	var column=mapNum[encodeURI((result[i].columnName+result[i].unit).trim())];
                    	var  str=perStr+'</tr><tr>'
                     		+'<td width="16%" align="center" class="textItem">'+result[i].columnName+'</td>'
                     		+'<td width="12%" align="center" class="textItem">'+result[i].nickName+'('+result[i].unit+')</td>'
                     		+'<td width="12%" align="left" colspan='+column+'><input type="hidden" name="id" id="id_'+i+'" value="'+result[i].iD+'"/><input type="text" class="textInput" onfocus="inputfocus(this);" onblur="inputblur(this);"  id="surveyTwo_"'+i+' name="surveyTwo" value="'+result[i].surveyTwo+'"></input></td>';
                 		flag=3+column-1;
                    }
                }
         		html=html+str;
         	}
         	var perStr=''
         	if(flag!=totalColumn){
            	while(flag<totalColumn){
                	flag++;
                	perStr=perStr+'<td></td>'
                }
            }
           html=html+perStr;
         	var table = document.getElementById("gridtable_2");
         	table.innerHTML=html;
        }
      //生成第三个tab
        function makeupTabThree(){
        	var html='';
            currName='';
        	var flag=0;//当前行的列
         	for(var i=0;i<result.length;i++){//通过判断明细项来确定是不是在同一行展示
             	if(currName==''){
             		currName=(result[i].columnName+result[i].unit).trim();
             		var column=mapNum[encodeURI((result[i].columnName+result[i].unit).trim())];
             		var  str='<tr>'
                 		+'<td width="16%" align="center" class="textItem">'+result[i].columnName+'</td>'
                 		+'<td width="12%" align="center" class="textItem">'+result[i].nickName+'('+result[i].unit+')</td>'
                 		+'<td width="12%" align="left" colspan='+column+'><input type="hidden" name="id" id="id_'+i+'" value="'+result[i].iD+'"/><input type="text" class="textInput" onfocus="inputfocus(this);" onblur="inputblur(this);"  id="surveyThree_"'+i+' name="surveyThree" value="'+result[i].surveyThree+'"></input></td>';
             		flag=3+column-1;
                }else{
                    if(currName==(result[i].columnName+result[i].unit).trim()){
                    	var column=mapNum[encodeURI((result[i].columnName+result[i].unit).trim())];
                    	var  str='<td width="12%" align="center" class="textItem">'+result[i].nickName+'('+result[i].unit+')</td>'
                     		+'<td width="12%" align="left" colspan='+column+'><input type="hidden" name="id" id="id_'+i+'" value="'+result[i].iD+'"/><input type="text" class="textInput" onfocus="inputfocus(this);" onblur="inputblur(this);"  id="surveyThree_"'+i+' name="surveyThree" value="'+result[i].surveyThree+'"></input></td>';
                 		flag=flag+2+column-1;
                    }else{
                        var perStr=''
                    	currName=(result[i].columnName+result[i].unit).trim();
                    	if(flag!=totalColumn){
                        	while(flag<totalColumn){
                            	flag++;
                            	perStr=perStr+'<td></td>'
                            }
                        }
                    	var column=mapNum[encodeURI((result[i].columnName+result[i].unit).trim())];
                    	var  str=perStr+'</tr><tr>'
                     		+'<td width="16%" align="center" class="textItem">'+result[i].columnName+'</td>'
                     		+'<td width="12%" align="center" class="textItem">'+result[i].nickName+'('+result[i].unit+')</td>'
                     		+'<td width="12%" align="left" colspan='+column+'><input type="hidden" name="id" id="id_'+i+'" value="'+result[i].iD+'"/><input type="text" class="textInput" onfocus="inputfocus(this);" onblur="inputblur(this);"  id="surveyThree_"'+i+' name="surveyThree" value="'+result[i].surveyThree+'"></input></td>';
                 		flag=3+column-1;
                    }
                }
         		html=html+str;
         	}
         	var perStr=''
         	if(flag!=totalColumn){
            	while(flag<totalColumn){
                	flag++;
                	perStr=perStr+'<td></td>'
                }
            }
           html=html+perStr;
         	var table = document.getElementById("gridtable_3");
         	table.innerHTML=html;
        }
      //生成第四个tab
        function makeupTabFour(){
        	var html='';
            currName='';
        	var flag=0;//当前行的列
         	for(var i=0;i<result.length;i++){//通过判断明细项来确定是不是在同一行展示
             	if(currName==''){
             		currName=(result[i].columnName+result[i].unit).trim();
             		var column=mapNum[encodeURI((result[i].columnName+result[i].unit).trim())];
             		var  str='<tr>'
                 		+'<td width="16%" align="center" class="textItem">'+result[i].columnName+'</td>'
                 		+'<td width="12%" align="center" class="textItem">'+result[i].nickName+'('+result[i].unit+')</td>'
                 		+'<td width="12%" align="left" colspan='+column+'><input type="hidden" name="id" id="id_'+i+'" value="'+result[i].iD+'"/><input type="text" class="textInput" onfocus="inputfocus(this);" onblur="inputblur(this);"  id="surveyFour_"'+i+' name="surveyFour" value="'+result[i].surveyFour+'"></input></td>';
             		flag=3+column-1;
                }else{
                    if(currName==(result[i].columnName+result[i].unit).trim()){
                    	var column=mapNum[encodeURI((result[i].columnName+result[i].unit).trim())];
                    	var  str='<td width="12%" align="center" class="textItem">'+result[i].nickName+'('+result[i].unit+')</td>'
                     		+'<td width="12%" align="left" colspan='+column+'><input type="hidden" name="id" id="id_'+i+'" value="'+result[i].iD+'"/><input type="text" class="textInput" onfocus="inputfocus(this);" onblur="inputblur(this);"  id="surveyFour_"'+i+' name="surveyFour" value="'+result[i].surveyFour+'"></input></td>';
                 		flag=flag+2+column-1;
                    }else{
                        var perStr=''
                    	currName=(result[i].columnName+result[i].unit).trim();
                    	if(flag!=totalColumn){
                        	while(flag<totalColumn){
                            	flag++;
                            	perStr=perStr+'<td></td>'
                            }
                        }
                    	var column=mapNum[encodeURI((result[i].columnName+result[i].unit).trim())];
                    	var  str=perStr+'</tr><tr>'
                     		+'<td width="16%" align="center" class="textItem">'+result[i].columnName+'</td>'
                     		+'<td width="12%" align="center" class="textItem">'+result[i].nickName+'('+result[i].unit+')</td>'
                     		+'<td width="12%" align="left" colspan='+column+'><input type="hidden" name="id" id="id_'+i+'" value="'+result[i].iD+'"/><input type="text" class="textInput" onfocus="inputfocus(this);" onblur="inputblur(this);"  id="surveyFour_"'+i+' name="surveyFour" value="'+result[i].surveyFour+'"></input></td>';
                 		flag=3+column-1;
                    }
                }
         		html=html+str;
         	}
         	var perStr=''
         	if(flag!=totalColumn){
            	while(flag<totalColumn){
                	flag++;
                	perStr=perStr+'<td></td>'
                }
            }
           html=html+perStr;
         	var table = document.getElementById("gridtable_4");
         	table.innerHTML=html;
        }
      //生成第五个tab
        function makeupTabFive(){
        	var html='';
            currName='';
        	var flag=0;//当前行的列
         	for(var i=0;i<result.length;i++){//通过判断明细项来确定是不是在同一行展示
             	if(currName==''){
             		currName=(result[i].columnName+result[i].unit).trim();
             		var column=mapNum[encodeURI((result[i].columnName+result[i].unit).trim())];
             		var  str='<tr>'
                 		+'<td width="16%" align="center" class="textItem">'+result[i].columnName+'</td>'
                 		+'<td width="12%" align="center" class="textItem">'+result[i].nickName+'('+result[i].unit+')</td>'
                 		+'<td width="12%" align="left" colspan='+column+'><input type="hidden" name="id" id="id_'+i+'" value="'+result[i].iD+'"/><input type="text" class="textInput" onfocus="inputfocus(this);" onblur="inputblur(this);"  id="surveyFive_"'+i+' name="surveyFive" value="'+result[i].surveyFive+'"></input></td>';
             		flag=3+column-1;
                }else{
                    if(currName==(result[i].columnName+result[i].unit).trim()){
                    	var column=mapNum[encodeURI((result[i].columnName+result[i].unit).trim())];
                    	var  str='<td width="12%" align="center" class="textItem">'+result[i].nickName+'('+result[i].unit+')</td>'
                     		+'<td width="12%" align="left" colspan='+column+'><input type="hidden" name="id" id="id_'+i+'" value="'+result[i].iD+'"/><input type="text" class="textInput" onfocus="inputfocus(this);" onblur="inputblur(this);"  id="surveyFive_"'+i+' name="surveyFive" value="'+result[i].surveyFive+'"></input></td>';
                 		flag=flag+2+column-1;
                    }else{
                        var perStr=''
                    	currName=(result[i].columnName+result[i].unit).trim();
                    	if(flag!=totalColumn){
                        	while(flag<totalColumn){
                            	flag++;
                            	perStr=perStr+'<td></td>'
                            }
                        }
                    	var column=mapNum[encodeURI((result[i].columnName+result[i].unit).trim())];
                    	var  str=perStr+'</tr><tr>'
                     		+'<td width="16%" align="center" class="textItem">'+result[i].columnName+'</td>'
                     		+'<td width="12%" align="center" class="textItem">'+result[i].nickName+'('+result[i].unit+')</td>'
                     		+'<td width="12%" align="left" colspan='+column+'><input type="hidden" name="id" id="id_'+i+'" value="'+result[i].iD+'"/><input type="text" class="textInput" onfocus="inputfocus(this);" onblur="inputblur(this);"  id="surveyFive_"'+i+' name="surveyFive" value="'+result[i].surveyFive+'"></input></td>';
                 		flag=3+column-1;
                    }
                }
         		html=html+str;
         	}
         	var perStr=''
         	if(flag!=totalColumn){
            	while(flag<totalColumn){
                	flag++;
                	perStr=perStr+'<td></td>'
                }
            }
           html=html+perStr;
         	var table = document.getElementById("gridtable_5");
         	table.innerHTML=html;
        }
        makeupTabOne();
        makeupTabTwo();
        makeupTabThree();
        makeupTabFour();
        makeupTabFive();
};
function inputfocus(obj){
		obj.value=obj.value+'+';
	}
function inputblur(obj){
		var itemValue=obj.value.split('+');
		var sum=0;
		for(var i=0;i<itemValue.length;i++){
			var val=0;
			if(itemValue[i]!=0){
				val=parseFloat(itemValue[i]);
			}
			if(isNaN(val)){
				alert('输入的非数值，请重新输入！');
				obj.value=0;
				return;
			}else{
				if(val.length!=0){
					sum=sum+val;
				}
			}
		}
		obj.value=sum;
	}
function makeupTab(){
	var html='';
    currName='';
	var flag=0;//当前行的列
 	for(var i=0;i<result.length;i++){
     	if(currName==''){
     		currName=(result[i].columnName+result[i].unit).trim();
     		var column=mapNum[encodeURI((result[i].columnName+result[i].unit).trim())];
     		var  str='<tr>'
         		+'<td width="16%" align="center" class="textItem">'+result[i].columnName+'</td>'
         		+'<td width="12%" align="center" class="textItem">'+result[i].nickName+'('+result[i].unit+')</td>'
         		+'<td width="12%" align="left" colspan='+column+'><input type="hidden" name="id" id="id_'+i+'" value="'+result[i].iD+'"/><input type="text" class="textInput" onfocus="inputfocus(this);" onblur="inputblur(this);"  id="surveyOne_"'+i+' name="surveyOne" value="'+result[i].surveyOne+'"></input></td>';
     		flag=3+column-1;
        }else{
            if(currName==(result[i].columnName+result[i].unit).trim()){
            	var column=mapNum[encodeURI((result[i].columnName+result[i].unit).trim())];
            	var  str='<td width="12%" align="center" class="textItem">'+result[i].nickName+'('+result[i].unit+')</td>'
             		+'<td width="12%" align="left" colspan='+column+'><input type="hidden" name="id" id="id_'+i+'" value="'+result[i].iD+'"/><input type="text" class="textInput" onfocus="inputfocus(this);" onblur="inputblur(this);"  id="surveyOne_"'+i+' name="surveyOne" value="'+result[i].surveyOne+'"></input></td>';
         		flag=flag+2+column-1;
            }else{
                var perStr=''
            	currName=(result[i].columnName+result[i].unit).trim();
            	if(flag!=totalColumn){
                	while(flag<totalColumn){
                    	flag++;
                    	perStr=perStr+'<td></td>'
                    }
                }
            	var column=mapNum[encodeURI((result[i].columnName+result[i].unit).trim())];
            	var  str=perStr+'</tr><tr>'
             		+'<td width="16%" align="center" class="textItem">'+result[i].columnName+'</td>'
             		+'<td width="12%" align="center" class="textItem">'+result[i].nickName+'('+result[i].unit+')</td>'
             		+'<td width="12%" align="left" colspan='+column+'><input type="hidden" name="id" id="id_'+i+'" value="'+result[i].iD+'"/><input type="text" class="textInput" onfocus="inputfocus(this);" onblur="inputblur(this);"  id="surveyOne_"'+i+' name="surveyOne" value="'+result[i].surveyOne+'"></input></td>';
         		flag=3+column-1;
            }
        }
 		html=html+str;
 	}
 	var perStr=''
 	if(flag!=totalColumn){
    	while(flag<totalColumn){
        	flag++;
        	perStr=perStr+'<td></td>'
        }
    }
   html=html+perStr;
 	var table = document.getElementById("gridtable_1"); 
 	table.innerHTML=html;
}
</script>